//
//  HotSerchData.m
//  __PRODUCTNAME__
//
//  Created by dllo on 16/09/19
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "HotSerchData.h"
#import "HotSerchProjlist.h"
#import "HotSerchOrglist.h"

@implementation HotSerchData

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"projlist"]) {
        NSMutableArray *listArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            HotSerchProjlist *projlist = [HotSerchProjlist modelWithDic:dic];
            [listArr addObject:projlist];
        }
        _projlist = listArr;
        
    } else if ([key isEqualToString:@"orglist"]){
        NSMutableArray *listArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            HotSerchOrglist *orglist = [HotSerchOrglist modelWithDic:dic];
            [listArr addObject:orglist];
        }
        _orglist = listArr;
    }
}

@end
